let {getPropByPath} = require('./toolFunc');

let temp = {
    name:'aaa',
    arr:['bbb','c'],
    arr2:[{age:2},{age:7}]
};

let temp1 = [{
    label:'lll'
}];

console.log(getPropByPath(temp1, '[0][label]', true));